import Vue from 'vue'
import Router from 'vue-router'
import login from "../views/login";
const logon =()=>import('../views/logon')
const ech =()=>import('../views/echartsHome')
const Text = () => import('../views/text')
const homePage = () => import('../views/homePage')
const PefectInfor = () => import('../components/homepa/PerfectInfor')
const  Home = () => import('../components/homepa/Home')
const EmployeeFiles = () => import('../components/homepa/EmployeeFiles')
const KaoQing = () => import('../components/homepa/KaoQing')
const person = () => import('../components/homepa/PersonnelTransfer')


Vue.use(Router)

const routes = [

  {
    path:'',
    redirect:'/login'
  },

  {
    path: '/perfectInfor',
    component:PefectInfor
  },
  {
    path:'/homepage',
    component:homePage,
    children:[
      {
        path: '/personnelTransfer',
        component: person
      },
      {
        path: '/kaoqing',
        component:KaoQing
      },
      {
        path: '/home',
        component:Home
      },
      {
        path: '/EmployeeFiles',
        component:EmployeeFiles
      }
    ]
  },

  {
    path: '/ech',
    component:ech,
  },
  {
    path: '/text',
    component: Text,
  },
  {path:'/login',
   component:login
  },
  {
    path:'/logon',
    component:logon
  }

]

const router = new Router({
  routes,
  mode:'history'
})

export default router
